const Router = require('koa-router');
const router = new Router();
const fs = require('fs');

const api = require('./api');

// vue-music-app 接口代理
const music = require('./music');
const commonRouter = require('./common');

// 具体路由只能用 all 或http方法
// router.all('/', async (ctx) => {
//     await ctx.render('index', { title: "Home Page" });
// });

router.use('/api/v1', api.routes());
router.use('/api/v1', commonRouter.routes());

// vue-music-app 接口代理
router.use('/api/music', music.routes());

module.exports = router;
